﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;

namespace Com.CMS263.DAO
{
    public class DiscussResultDAO : BaseService
    {
        public IList<DiscussResult> GetListByPaging(int disid, int page, int pagesize)
        {
            string hql = " from DiscussResult where 1=1 and  DisId="+disid+"  order by AddDate desc";
            return FindList<DiscussResult>(hql, null, ((page - 1) * pagesize), pagesize);
        }

        public int GetCountByDisId(int disid)
        {
            string hql = "select count (*) from DiscussResult where 1=1 and  DisId=" + disid;
            return Convert.ToInt32(GetValue(hql));
        }
    }
}
